package com.pactera.controller.common.web;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import springfox.documentation.annotations.ApiIgnore;

/**
 * @ClassName：ComponentDemoController
 * @Description：通用组件demo控制类
 * @author pactera 
 * @date 2018年12月5日 下午3:27:16 
 * @version 1.0.0
 */
@ApiIgnore
@Controller
public class ComponentDemoController {
	
	@RequestMapping(value = "/demo", method = RequestMethod.GET)
    public String index(Model model,HttpServletRequest request) {
		return "/views/demo/Index";
    }
	
	@RequestMapping(value = "/demo/page", method = RequestMethod.GET)
    public String page(Model model,HttpServletRequest request) {
		model.addAttribute("user", "admin");
		return "/views/demo/page";
    }
	
	@RequestMapping(value = "/ajax", method = RequestMethod.GET)
    public String ajax(Model model,HttpServletRequest request) {
		return "/views/demo/Ajax";
    }
	
	@RequestMapping(value = "/cookie", method = RequestMethod.GET)
    public String cookie(Model model,HttpServletRequest request) {
		return "/views/demo/Cookie";
    }
	
	@RequestMapping(value = "/upload", method = RequestMethod.GET)
    public String upload(Model model,HttpServletRequest request) {
		return "/views/demo/Upload";
    }
	
	@RequestMapping(value = "/url", method = RequestMethod.GET)
    public String url(Model model,HttpServletRequest request) {
		return "/views/demo/Url";
    }
	
	@RequestMapping(value = "/format", method = RequestMethod.GET)
    public String format(Model model,HttpServletRequest request) {
		return "/views/demo/Format";
    }
	
	@RequestMapping(value = "/pagination", method = RequestMethod.GET)
    public String pagination(Model model,HttpServletRequest request) {
		return "/views/demo/Pagination";
    }
	
	@RequestMapping(value = "/table", method = RequestMethod.GET)
	public String table(Model model,HttpServletRequest request) {
		return "/views/demo/Table";
	}
	
	@RequestMapping(value = "/nav", method = RequestMethod.GET)
	public String nav(Model model,HttpServletRequest request) {
		return "/views/demo/Nav";
	}
	
	@RequestMapping(value = "/tab", method = RequestMethod.GET)
	public String tab(Model model,HttpServletRequest request) {
		return "/views/demo/Tab";
	}
	
	@RequestMapping(value = "/date", method = RequestMethod.GET)
	public String date(Model model,HttpServletRequest request) {
		return "/views/demo/Date";
	}
	
	@RequestMapping(value = "/dropdown", method = RequestMethod.GET)
	public String dropdown(Model model,HttpServletRequest request) {
		return "/views/demo/Dropdown";
	}
	
	@RequestMapping(value = "/msg", method = RequestMethod.GET)
	public String msg(Model model,HttpServletRequest request) {
		return "/views/demo/Msg";
	}
	
	@RequestMapping(value = "/validate", method = RequestMethod.GET)
	public String validate(Model model,HttpServletRequest request) {
		return "/views/demo/Validate";
	}
	
	@RequestMapping(value = "/tree", method = RequestMethod.GET)
	public String tree(Model model,HttpServletRequest request) {
		return "/views/demo/Tree";
	}
	
	/**
	 * @Description:下拉多级联动
	 * @author pactera
	 * @date 2018年12月5日 下午3:23:24
	 */
	@RequestMapping(value = "/cascade", method = RequestMethod.GET)
	public String cascade(Model model,HttpServletRequest request) {
		return "/views/demo/Cascade";
	}
	
	@RequestMapping(value = "/loading", method = RequestMethod.GET)
	public String loading(Model model,HttpServletRequest request) {
		return "/views/demo/Loading";
	}
}
